<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <script src="js/mui.min.js"></script>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
</head>
<body>

				
	<script>
		
		//预加载模板父页面
var pagelogin = mui.preload({
    url:'login.html',
    id:'login',
    
    show:{
      autoShow:false
    }
});
//预加载共用子页面
var pagemain = mui.preload({
    url:'main/tab-webview-main.html',
    id:'main',
    show:{
      autoShow:false
    }
});

		
		
		
		var _MYCLIENTID = localStorage.getItem('_clientid');
		
		if(!_MYCLIENTID)
		{
			console.log('a');
			pagelogin.loadURL('login.html');
			pagelogin.show();
		}
		else
		{
			console.log('b');
			pagemain.loadURL('main/tab-webview-main.html');
			pagemain.show();
		}
		
		/*
		var btn = document.getElementById("btnmain"); //监听点击事件 
		btn.addEventListener("tap",function () { 
			console.log("tap event trigger"); 
			location.href="main/tab-webview-main.html";
		}); //触发submit按钮的点击事件
		//mui.trigger(btn,'tap');
		*/
	</script>
</body>
</html>